/*
 * @Author: blak-kong
 * @Date: 2019-12-02 11:34:32
 * @Email: 546598185@qq.com
 */
// @login & register

const router = require('koa-router')()
router.prefix('/api/nav')

const controller = require('../controller')


// @route  POST api/pages
// @desc   返回的请求的json数据
// @access public
router.get('/test', async (ctx, next) => {
    ctx.body = "hello pages!"
})
.get('/', controller.nav.query_page)                // 分页导航
.get('/:id', controller.nav.query)                  // 查询导航
.post('/add', controller.nav.add)                   // 添加导航
.post('/update/:id', controller.nav.update)         // 更新导航
.delete('/delete/:id', controller.nav.delete)       // 删除导航
 


module.exports = router;
